package main

import (
	"gorm.io/driver/mysql"
	"gorm.io/gorm"
	"seichat/models"
)

func main() {
	dsn := "root:123456@tcp(192.168.200.129:13316)/sei_chat?charset=utf8mb4&parseTime=True&loc=Local"
	db, err := gorm.Open(mysql.Open(dsn), &gorm.Config{})
	if err != nil {
		panic(err)
	}
	err = db.AutoMigrate(&models.Message{})
	if err != nil {
		panic(err)
	}
}
